<template>
  <div class="event-tpl">
      <button @click="handleClick('哈哈',$event)">点击事件</button>
  </div>
</template>

<script>
export default {
  name: 'EventTpl',
  setup () {
    const handleClick = (msg, e) => {
      alert(msg)
      e.srcElement.style.background = 'red'
    }
    return {
      handleClick
    }
  }
}

</script>
<style scoped lang='scss'>

</style>
